﻿using DHQGHN.DAL.Common;
using DHQGHN.DAL.DAO.DHQG;
using DHQGHN.DAL.Models.DHQG;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DHQGHN.DAL.BO.DHQG
{
    public class NguoiDungChiTieuBO:BaseBO
    {
        private NguoiDungChiTieuDAO _dao;

        public NguoiDungChiTieuBO()
        {
            _dao = new NguoiDungChiTieuDAO(Common.ConnectionUtil.DHQGHN_CONNECTION_STRING, DEFAULT_MAPPER_TYPE);
        }
        public DataPage<NguoiDungChiTieu> GetListPaging(NguoiDungChiTieu model, int pageIndex, int pageSize)
        {
            try
            {
                return _dao.GetListPaging(model, pageIndex, pageSize);
            }
            catch
            {
                throw;
            }
        }

        public List<NguoiDungChiTieu> GetListChiTieu(NguoiDungChiTieu model)
        {
            try
            {
                return _dao.GetListChiTieu(model);
            }
            catch
            {
                throw;
            }
        }

        public bool Save(List<NguoiDungChiTieu> listData)
        {
            try
            {
                return _dao.Save(listData);
            }
            catch
            {
                throw;
            }
        }

        public bool Delete(int[] id)
        {
            try
            {
                return _dao.Delete(id);
            }
            catch
            {
                throw;
            }
        }
    }
}
